class PlayerConfig {
  final bool hardwareDecode;
  final bool batteryOptimization;
  final int memoryLimitMB;
  final int maxFrameRate;
  final int quality;
  final bool lowLatency;
  
  const PlayerConfig({
    this.hardwareDecode = true,
    this.batteryOptimization = false,
    this.memoryLimitMB = 100,
    this.maxFrameRate = 60,
    this.quality = 100,
    this.lowLatency = false,
  });
  
  factory PlayerConfig.defaultConfig() {
    return const PlayerConfig();
  }
  
  factory PlayerConfig.batteryOptimized() {
    return const PlayerConfig(
      hardwareDecode: false,
      batteryOptimization: true,
      memoryLimitMB: 50,
      maxFrameRate: 24,
      quality: 80,
    );
  }
  
  factory PlayerConfig.highQuality() {
    return const PlayerConfig(
      hardwareDecode: true,
      batteryOptimization: false,
      memoryLimitMB: 200,
      maxFrameRate: 60,
      quality: 100,
    );
  }
  
  Map<String, dynamic> toMap() {
    return {
      'hardwareDecode': hardwareDecode,
      'batteryOptimization': batteryOptimization,
      'memoryLimitMB': memoryLimitMB,
      'maxFrameRate': maxFrameRate,
      'quality': quality,
      'lowLatency': lowLatency,
    };
  }
}
